﻿using Prism.Commands;
using Prism.Mvvm;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonModule.ViewModels
{
    public class SidebarViewModel: BindableBase
    {
        private readonly IRegionManager _regionManager;

        public DelegateCommand NavigateDeviceCommand { get; }
        public DelegateCommand NavigateDataCommand { get; }

        public SidebarViewModel(IRegionManager regionManager)
        {
            _regionManager = regionManager;

            NavigateDeviceCommand = new DelegateCommand(() =>
                _regionManager.RequestNavigate("MainRegion", "DeviceListView"));

            NavigateDataCommand = new DelegateCommand(() =>
                _regionManager.RequestNavigate("MainRegion", "DataListView"));
        }
    }
}
